PROJECT(edm)

#表示头文件列表的变量
FILE(GLOB INCS "./*.h")

#表示源文件列表的变量
FILE(GLOB SRCS "./*.cpp")

#包含目录

SET(LIBRARYS
	boost_system
	common
	boost_thread
	pthread
	resolv)

#是debug编译还是release编译
OPTION(MYPROJECT_DEBUG
  "Build the project using debugging code"
  ON)
IF(MYPROJECT_DEBUG)
	SET(CMAKE_BUILD_TYPE "Debug")
ELSE(MYPROJECT_DEBUG)
	SET(CMAKE_BUILD_TYPE "Release")
ENDIF(MYPROJECT_DEBUG)

#添加宏
ADD_DEFINITIONS(-Wall)

ADD_EXECUTABLE(maildrop ${SRCS})
TARGET_LINK_LIBRARIES(maildrop ${LIBRARYS})

INSTALL(TARGETS maildrop
        RUNTIME DESTINATION bin)